import { createRouter, createWebHashHistory } from "vue-router"
import Home from '../views/Home/index.vue'
import Welcome from '../views/Welcome'
import Login from '../views/Login'

const routes = [
  {
    path: '/',
    name: 'home',
    meta: {
      title: '首页'
    },
    component: Home,
    redirect: 'welcome',
    children: [
      {
        path: 'welcome',
        component: Welcome,
        meta: {
          title: '欢迎'
        }
      }
    ]
  },
  {
    path: '/login',
    meta: {
      title: '登录'
    },
    component: Login
  }
]

const router = createRouter({
  routes,
  history: createWebHashHistory()
})


export default router